<cfoutput>
	<cfparam name="PARAMS.debug" default="false">
	<cfsavecontent variable="Header">
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<meta http-equiv="content-type" content="text/html;charset=utf-8" />
				<title>Safe Journey House EMR | #humanize(Get("Navigation").tabNames[1])#</title>
				
				#stylesheetLinkTag(sources="absolution.blue,jquery.ui.tabs-1.9m5,tipsy,jBreadCrumb,validationEngine.jquery,twitter.bootstrap,jquery.dataTables,SafeJourneyHouse")#
				#javascriptIncludeTag(sources="jquery-1.7.1.min,jquery-ui-1.9m5,bootstrap,grid.locale-en,jquery.dataTables.1.90,jquery.dataTables.rowGrouping,jquery.jBreadCrumb.1.1,jquery.tipsy,jquery.validationEngine,jquery.validationEngine-en")#
				
				<script type="text/javascript">
					$(function() {
						$('div##navigation span').button().css({	'fontWeight': 'bold', 'margin': '0px'	});
						$('span.tabL').css({	'borderWidth': '0px 1px 0px 0px', 'borderRadius': '0px', 'borderColor': '##A9A9A9'	});
						$('span.tabR').css({	'borderWidth': '0px 0px 0px 1px', 'borderRadius': '0px',  'borderColor': '##A9A9A9'	});

						$('div##navigation').show().height($('div##navigation span:first').height());
			
					<cfloop list="consumer,document,admin,logout" index="tab">
						$('###tab#').click(function() {
							location = '#URLFor(controller="Main", action="#tab#", onlyPath=false)#';
						})	.mouseover(function() {
            				 		$(this).parent().removeClass("ui-state-hover");	});
					</cfloop>			
	
						$('###Get("Navigation").tab#')
							.button({	disabled: true })
							.removeClass('ui-state-default ui-state-disabled').addClass('ui-menu-selected')
							.attr('disabled', false).css('cursor', 'default');

						$('span.tabL').css({	"borderRight": "1px solid ##A9A9A9"							})
						$('span.tabR').css({	"borderLeft": "1px solid ##A9A9A9", 'margin-left': '1px'	});
					});
				</script>
			</head>
			<body>
	</cfsavecontent>
	<cfsavecontent variable="Menu">
				<cfif StructKeyExists(SESSION, "user") >
				<div id="welcomeMessage">	
					<div class="alert-message info"><p>Welcome to the EMR, <strong>#SESSION.user.name#!</strong></p></div>
				</div>				   
				</cfif>
				<div id="navigation">
					<span id="consumer" class="tabL">Consumers Database</span>
					<span id="document" class="tabL">Documents</span>
					<span id="logout" class="tabR">Log Out</span>
					<cfif StructKeyExists(SESSION, "User") AND SESSION.user.UserType IS "admin"><span id="admin" class="tabR">Settings</span></cfif>
				</div>
	</cfsavecontent>
	<cfsavecontent variable="Footer">
				#javascriptIncludeTag(sources="SafeJourneyHouse")#
			</body>
		</html>
	</cfsavecontent>

	<cfset ContentFor(Header = Header)>
	<cfset ContentFor(Menu = Menu)>
	<cfset ContentFor(Footer = Footer)>

	<cfif NOT isAjax() AND NOT ListFindNoCase("Insurance,Doctor,ITP,Assessment,Medication,Discharge", PARAMS.controller)>
		#includeContent("Header")#
		<h1>Safe Journey House EMR | <em>#humanize(Get("Navigation").tabNames[1])#</em></h1>
		<cfif  NOT ListFindNoCase("login,signin,logout,passwordReset", Get('Navigation').tab)>
			#includeContent("Menu")#
			
			<cfif Get('Navigation').tab IS NOT 'home'>
				<!--- Breadcrumbs --->
				<div class="breadCrumbHolder module">
					<div id="breadcrumbs" class="breadCrumb module">
						<ul>
							<cfset TabNames = Get("Navigation").tabNames>
							<cfloop from="1" to="#ArrayLen(tabNames)#" index="intRow">
								<li><a>#TabNames[intRow]#</a><cfif intRow EQ 1><strong>#tabNames[intRow]# Home</strong></cfif></li>
							</cfloop>
						</ul>
					</div>			
				</div>
				<div class="chevronOverlay main"></div>
			</cfif>
		</cfif>
		<div id="bodyContent">#includeContent()#</div>
		<div id="dialog"></div>
		<span id="textWidth" style="display: none;"></span>
		#includeContent("Footer")#
	<cfelse>
		<cfif PARAMS.debug>#includeContent("header")#</cfif>
		#IIF(ListFindNoCase("Insurance,Doctor,ITP,Assessment,Medication,Discharge", PARAMS.controller), DE('<div class="forms">'), DE(''))#		
		#includeContent()#
		#IIF(ListFindNoCase("Insurance,Doctor,ITP,Assessment,Medication,Discharge", PARAMS.controller), DE('</div>'), DE(''))#
		<cfif PARAMS.debug>#includeContent("footer")#</cfif>
	</cfif>
</cfoutput>